﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="SitemapHandler.aspx.cs"
    Inherits="RCREEE.Web.SitemapHandler" MasterPageFile="~/Site.Master" Culture="auto"
    meta:resourcekey="PageResource1" UICulture="auto" %>

<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="ajaxToolkit" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
    <title>Sitemap Handler</title>
    <script type="text/javascript">
        $().ready(function () {
            $('#dialogContent').dialog({
                autoOpen: false,
                modal: true,
                bgiframe: true,
                title: "Confirm Delete",
                width: 300,
                height: 200
            });
        });

        function deleteAction(uniqueID) {

            $('#dialogContent').dialog('option', 'buttons',
                {
                    "OK": function () { __doPostBack(uniqueID, ''); $(this).dialog("close"); },
                    "Cancel": function () { $(this).dialog("close"); }
                });

            $('#dialogContent').dialog('open');

            return false;
        }

    </script>
    <div id="header">
        <div id="section">
            <table width="100%">
                <tr>
                    <td width="20%" align="center" valign="middle">
                        <img src="Images/LogoRCREEE_Transparent.png" width="200px" />
                    </td>
                    <td width="60%" align="center" valign="middle">
                        <img src="Images/areeed-ba-txtr.png" width="600px" />
                    </td>
                    <td width="25%" align="center" valign="top">
                        <img src="Images/las-logo.png" width="85px" />
                    </td>
                </tr>
            </table>
        </div>
        <ul>
            <li><a href="Default.aspx">Home</a></li>
            <li><a href="Index.aspx">Index</a></li>
            <li><a href="Topics.aspx">Topics</a></li>
            <li><a href="CountrySelector.aspx">Countries</a></li>
            <li><a href="Aboutus.aspx">About Us</a></li>
            <li><a href="contactus.aspx">Contact us</a></li>
        </ul>
    </div>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <center>
        <div id="dialogContent" style="font-size: small">
            <p>
                Are you sure you want to delete?</p>
        </div>
        <div id="Div1" runat="server">
            <ajaxToolkit:ToolkitScriptManager runat="server" ID="scriptManager" CombineScripts="True" />
            <asp:UpdateProgress ID="Up1" runat="Server" AssociatedUpdatePanelID="updatePanel1">
                <ProgressTemplate>
                    <div class="progressBackgroundFilter">
                    </div>
                    <div class="processMessage">
                        Loading...<br />
                        <br />
                        <img alt="Loading..." src="Images/Loading.gif" />
                    </div>
                </ProgressTemplate>
            </asp:UpdateProgress>
            <asp:UpdatePanel ID="updatePanel1" runat="server">
                <ContentTemplate>
                    <div style="background-color: #EEEEEE; width: 100%;">
                        <table>
                            <tr>
                                <td style="background-color: #FFD700; text-align: top;">
                                    <asp:Panel ID="Panel2" runat="server" GroupingText="Nodes" meta:resourcekey="Panel2Resource1">
                                        <div align="left" style="width: 170px; text-align: top; overflow: auto; height: 300px;">
                                            <asp:TreeView runat="server" ID="treesiteMap" OnSelectedNodeChanged="SiteMapTree_SelectedNodeChanged"
                                                Style="text-align: left; margin-left: 0; margin-right: auto; padding-left: 0;
                                                padding-right: auto; position: static" meta:resourcekey="treesiteMapResource1">
                                                <HoverNodeStyle BackColor="LightBlue" />
                                                <SelectedNodeStyle BackColor="LightGray" />
                                            </asp:TreeView>
                                        </div>
                                    </asp:Panel>
                                </td>
                                <td style="background-color: #EEEEEE;">
                                    <table>
                                        <tr>
                                            <td>
                                                <asp:Label runat="server" ForeColor="Red" Font-Bold="true" />
                                            </td>
                                        </tr>
                                        <tr>
                                            <td>
                                                <div style="background-color: #8F8F8F; text-align: top; height: 24px;">
                                                    <div style="float: left; background-color: #8F8F8F;">
                                                        <asp:Label runat="server" ID="lblEnityData" Text="Enity Data" meta:resourcekey="lblEnityDataResource1" />
                                                    </div>
                                                    <div style="float: right; background-color: #8F8F8F;">
                                                        <asp:Button runat="server" ID="btnNew" Text="Create New" OnClick="BtnNew_Clicked"
                                                            meta:resourcekey="btnNewResource1" />
                                                    </div>
                                                </div>
                                            </td>
                                        </tr>
                                        <tr>
                                            <td>
                                                <table>
                                                    <tr>
                                                        <td>
                                                            <asp:Label runat="server" ID="Label7" Text="Title" Font-Bold="True" meta:resourcekey="lblTitleResource1" />
                                                        </td>
                                                    </tr>
                                                    <tr>
                                                        <td>
                                                            <asp:Label runat="server" ID="lblEntityEnglish" Text="English" meta:resourcekey="lblEntityEnglishResource1" />
                                                        </td>
                                                        <td>
                                                            <asp:TextBox runat="server" ID="txtTitleEnglish" meta:resourcekey="txtTitleEnglishResource1" />
                                                            <asp:RequiredFieldValidator ID="RequiredFieldValidator4" runat="server" ControlToValidate="txtTitleEnglish"
                                                                Text="*" meta:resourcekey="RequiredFieldValidator4Resource1" ValidationGroup="groupSaveValidation" />
                                                        </td>
                                                    </tr>
                                                    <tr>
                                                        <td>
                                                            <asp:Label runat="server" ID="lblEntityArabic" Text="Arabic" meta:resourcekey="lblEntityArabicResource1" />
                                                        </td>
                                                        <td>
                                                            <asp:TextBox runat="server" ID="txtTitleArabic" meta:resourcekey="txtTitleArabicResource1" />
                                                            <asp:RequiredFieldValidator ID="RequiredFieldValidator5" runat="server" ControlToValidate="txtTitleArabic"
                                                                Text="*" meta:resourcekey="RequiredFieldValidator5Resource1" ValidationGroup="groupSaveValidation" />
                                                        </td>
                                                    </tr>
                                                    <tr>
                                                        <td>
                                                            <asp:Label runat="server" ID="lblEntityFrench" Text="French" meta:resourcekey="lblEntityFrenchResource1" />
                                                        </td>
                                                        <td>
                                                            <asp:TextBox runat="server" ID="txtTitleFrench" meta:resourcekey="txtTitleFrenchResource1" />
                                                            <asp:RequiredFieldValidator ID="RequiredFieldValidator6" runat="server" ControlToValidate="txtTitleFrench"
                                                                Text="*" meta:resourcekey="RequiredFieldValidator6Resource1" ValidationGroup="groupSaveValidation" />
                                                        </td>
                                                    </tr>
                                                    <tr>
                                                        <td>
                                                            <asp:Label runat="server" ID="lblLevel" Text="Level" Font-Bold="True" meta:resourcekey="lblLevelResource1" />
                                                        </td>
                                                        <td>
                                                            <asp:DropDownList runat="server" ID="ddlLevel" meta:resourcekey="ddlLevelResource1" />
                                                            <asp:RequiredFieldValidator ID="RequiredFieldValidator7" runat="server" ControlToValidate="ddlLevel"
                                                                Text="*" meta:resourcekey="RequiredFieldValidator4Resource1" ValidationGroup="groupSaveValidation" />
                                                        </td>
                                                        <td>
                                                        </td>
                                                    </tr>
                                                    <tr>
                                                        <td colspan="3">
                                                            <asp:Label runat="server" ID="lblLevelNote" Text="Note: A parent node must be choosen first from the right panel, in order to choose the level of the current Node among the choosen parent's children."
                                                                Font-Size="Small" ForeColor="#CC0000" Font-Bold="True" />
                                                        </td>
                                                    </tr>
                                                    <tr>
                                                        <td colspan="2">
                                                            <div style="text-align: top; height: 14px; width: 100%">
                                                        </td>
                                                        <td>
                                                        </td>
                                                    </tr>
                                                    <tr>
                                                        <%--  <td>
                                                            <asp:Label runat="server" ID="Label1" Text="Description" Font-Bold="True" meta:resourcekey="Label1Resource1" />
                                                        </td>--%>
                                                        <td colspan="3">
                                                            <asp:RadioButton runat="server" ID="rdNormalEntity" Text="Category" GroupName="EntityCategory"
                                                                AutoPostBack="True" OnCheckedChanged="RdEntityCatCheckedChanged" Checked="True"
                                                                meta:resourcekey="rdNormalEntityResource1" />
                                                            <asp:RadioButton runat="server" ID="rdCadreEntity" Text="Content" GroupName="EntityCategory"
                                                                AutoPostBack="True" OnCheckedChanged="RdEntityCatCheckedChanged" meta:resourcekey="rdCadreEntityResource1" />
                                                        </td>
                                                    </tr>
                                                    <tr>
                                                        <td>
                                                        </td>
                                                        <td>
                                                            <asp:Button runat="server" ID="btnSave" Text="Save" OnClick="BtnSave_Clicked" meta:resourcekey="btnSaveResource1"
                                                                ValidationGroup="groupSaveValidation" />
                                                        </td>
                                                        <td>
                                                            <asp:Button runat="server" ID="btnDelete" Text="Delete" OnClick="BtnDelete_Clicked"
                                                                OnClientClick="javascript:return deleteAction(this.name);" meta:resourcekey="btnDeleteResource1"
                                                                Enabled="false" />
                                                        </td>
                                                    </tr>
                                                </table>
                                            </td>
                                        </tr>
                                    </table>
                                </td>
                                <td style="background-color: #EEEEEE; text-align: top;">
                                    <asp:Panel ID="Panel1" runat="server" GroupingText="Parent" meta:resourcekey="Panel1Resource1">
                                        <div style="width: 170px; text-align: top; overflow: auto; height: 300px;">
                                            <asp:TreeView runat="server" ID="treeParents" OnSelectedNodeChanged="TreeParents_SelectedNodeChanged"
                                                Style="text-align: left; margin-left: 0; margin-right: auto; padding-left: 0;
                                                padding-right: auto; position: static" meta:resourcekey="treeParentsResource1">
                                                <HoverNodeStyle BackColor="LightBlue" />
                                                <SelectedNodeStyle BackColor="LightGray" />
                                            </asp:TreeView>
                                        </div>
                                    </asp:Panel>
                                </td>
                            </tr>
                            <tr>
                                <td colspan="3">
                                    <asp:MultiView ID="MultiView" runat="server" ActiveViewIndex="0">
                                        <asp:View ID="viewDescription" runat="server">
                                            <div style="width: 100%">
                                                <table>
                                                    <tr>
                                                        <td colspan="3">
                                                            <div style="text-align: top; height: 14px; width: 100%">
                                                        </td>
                                                    </tr>
                                                    <tr>
                                                        <td>
                                                            <asp:Label runat="server" ID="lblType" Text="Type" meta:resourcekey="lblTypeResource1" />
                                                        </td>
                                                        <td>
                                                            <asp:DropDownList ID="ddlTypes" runat="server" DataValueField="ItemID" DataTextField="Name"
                                                                meta:resourcekey="ddlTypesResource1">
                                                            </asp:DropDownList>
                                                        </td>
                                                        <td>
                                                        </td>
                                                        <td>
                                                        </td>
                                                    </tr>
                                                    <tr>
                                                        <td>
                                                            <asp:Label runat="server" ID="lblEntity" Text="Category" Font-Bold="True" meta:resourcekey="lblEntityResource1" />
                                                        </td>
                                                    </tr>
                                                    <tr>
                                                        <td>
                                                            <asp:Label runat="server" ID="Label2" Text="English" meta:resourcekey="lblEntityEnglishResource1" />
                                                        </td>
                                                        <td>
                                                            <asp:TextBox runat="server" ID="txtEntityEnglish" meta:resourcekey="txtEntityEnglishResource1" />
                                                            <asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" ControlToValidate="txtEntityEnglish"
                                                                Text="*" meta:resourcekey="RequiredFieldValidator1Resource1" ValidationGroup="groupSaveValidation" />
                                                        </td>
                                                    </tr>
                                                    <tr>
                                                        <td>
                                                            <asp:Label runat="server" ID="Label3" Text="Arabic" meta:resourcekey="lblEntityArabicResource1" />
                                                        </td>
                                                        <td>
                                                            <asp:TextBox runat="server" ID="txtEntityArabic" meta:resourcekey="txtEntityArabicResource1" />
                                                            <asp:RequiredFieldValidator ID="RequiredFieldValidator2" runat="server" ControlToValidate="txtEntityArabic"
                                                                Text="*" meta:resourcekey="RequiredFieldValidator2Resource1" ValidationGroup="groupSaveValidation" />
                                                        </td>
                                                    </tr>
                                                    <tr>
                                                        <td>
                                                            <asp:Label runat="server" ID="Label4" Text="French" meta:resourcekey="lblEntityFrenchResource1" />
                                                        </td>
                                                        <td>
                                                            <asp:TextBox runat="server" ID="txtEntityFrench" meta:resourcekey="txtEntityFrenchResource1" />
                                                            <asp:RequiredFieldValidator ID="RequiredFieldValidator3" runat="server" ControlToValidate="txtEntityFrench"
                                                                Text="*" meta:resourcekey="RequiredFieldValidator3Resource1" ValidationGroup="groupSaveValidation" />
                                                        </td>
                                                    </tr>
                                                    <tr>
                                                        <td>
                                                            <asp:Label runat="server" ID="Label5" Text="Description" Font-Bold="True" meta:resourcekey="lblEntityDescription" />
                                                        </td>
                                                    </tr>
                                                    <tr>
                                                        <td>
                                                            <asp:Label runat="server" ID="Label1" Text="English" meta:resourcekey="lblEntityEnglishResource1" />
                                                        </td>
                                                        <td>
                                                            <asp:TextBox runat="server" ID="txtEnglishDescription" meta:resourcekey="txtEnglishDescriptionResource1" />
                                                        </td>
                                                    </tr>
                                                    <tr>
                                                        <td>
                                                            <asp:Label runat="server" ID="Label6" Text="Arabic" meta:resourcekey="lblEntityArabicResource1" />
                                                        </td>
                                                        <td>
                                                            <asp:TextBox runat="server" ID="txtArabicDescription" meta:resourcekey="txtArabicDescriptionResource1" />
                                                        </td>
                                                    </tr>
                                                    <tr>
                                                        <td>
                                                            <asp:Label runat="server" ID="Label8" Text="French" meta:resourcekey="lblEntityFrenchResource1" />
                                                        </td>
                                                        <td>
                                                            <asp:TextBox runat="server" ID="txtFrenchDescription" meta:resourcekey="txtFrenchDescriptionResource1" />
                                                        </td>
                                                    </tr>
                                                </table>
                                            </div>
                                        </asp:View>
                                        <asp:View ID="viewCadre" runat="server">
                                            <asp:Panel ID="Panel3" runat="server" Style="width: 100%" GroupingText="English">
                                                <asp:TextBox ID="editorEnglish" runat="server" meta:resourcekey="editorCadreResource1"
                                                    TextMode="MultiLine" Rows="20" Width="100%"></asp:TextBox>
                                                <ajaxToolkit:HtmlEditorExtender ID="htmlEditorExtender1" TargetControlID="editorEnglish"
                                                    runat="server">
                                                </ajaxToolkit:HtmlEditorExtender>
                                            </asp:Panel>
                                            <asp:Panel ID="Panel4" runat="server" Style="width: 100%" GroupingText="Arabic">
                                                <asp:TextBox ID="editorArabic" runat="server" meta:resourcekey="editorCadreResource1"
                                                    TextMode="MultiLine" Rows="20" Width="100%"></asp:TextBox>
                                                <ajaxToolkit:HtmlEditorExtender ID="htmlEditorExtender2" TargetControlID="editorArabic"
                                                    runat="server">
                                                </ajaxToolkit:HtmlEditorExtender>
                                            </asp:Panel>
                                            <asp:Panel ID="Panel5" runat="server" Style="width: 100%" GroupingText="French">
                                                <asp:TextBox ID="editorFrench" runat="server" meta:resourcekey="editorCadreResource1"
                                                    TextMode="MultiLine" Rows="20" Width="100%"></asp:TextBox>
                                                <ajaxToolkit:HtmlEditorExtender ID="htmlEditorExtender3" TargetControlID="editorFrench"
                                                    runat="server">
                                                </ajaxToolkit:HtmlEditorExtender>
                                            </asp:Panel>
                                        </asp:View>
                                    </asp:MultiView>
                                </td>
                            </tr>
                        </table>
                    </div>
                </ContentTemplate>
            </asp:UpdatePanel>
        </div>
    </center>
</asp:Content>
